package com.cuitrip.apiservice;

import com.cuitrip.apiservice.model.ApiManager;
import com.cuitrip.business.pay.model.AdyenInfo;
import com.lab.network.model.CtApiRequest;
import com.lab.network.model.CtRemoteBusiness;
import com.lab.network.model.ParseType;
import com.lab.network.proxy.ApiProxy;

/**
 * Created by sheena on 15/11/30.
 */
public class PayBusiness {

    public static void requestPayWithAdyen(ApiProxy apiProxy,String orderId,String channel,String clientIp,String payCurrency,String encrypted,String couponIds){
        CtApiRequest ctApiRequest=new CtApiRequest();
        ctApiRequest.setApiName(ApiManager.CHANNEL_PAY);
        ctApiRequest.addParam("orderId", orderId);
        ctApiRequest.addParam("channel",channel);
        ctApiRequest.addParam("clientIp",clientIp);
        ctApiRequest.addParam("payCurrency",payCurrency);
        ctApiRequest.addParam("encrypted",encrypted);
        ctApiRequest.addParam("couponIds",couponIds);
        CtRemoteBusiness ctRemoteBusiness=new CtRemoteBusiness(ctApiRequest);
        apiProxy.postAsync(ctRemoteBusiness,new ParseType(AdyenInfo.class));
    }
}
